<?php
/**
 * Chapter-View: `add`
 *
 * PHP versions 4 and 5
 *
 * TutoriumBase (http://tutoriumbase.my-reality.de)
 * Copyright 2012, Miguel Gonzalez (http://my-reality.de)
 *
 *
 * @copyright     Copyright 2012, Miguel Gonzalez (http://my-reality.de)
 * @link          http://tutoriumbase.my-reality.de TutoriumBase
 * @since         TutoriumBase v 0.1
 */
echo '<div class="box">';
echo $this->Layout->generateTinyMCE();

if (isset($caption)) {
  echo $this->Layout->generateMainCaption($caption);
}

echo $this->Form->create('Chapter', array('action' => 'add/' . $data['Tutorial']['id']));
echo $this->Form->input('caption', array('type' => 'text', 'label' => 'Überschrift'));
echo $this->Form->input('content', array('type' => 'textarea', 'label' => 'Inhalt'));
echo $this->Form->input('position', array('class' => 'select', 'label' => 'Ausrichtung', 
                        'options' => $this->Chapter->buildOrder($data['Chapter']), 'default' => count($data['Chapter']) + 1));
echo $this->Form->submit('Erstellen', array('class' => 'button_green form_button'));
echo $this->Form->end();
echo '</div>';
?>